<form th:object="${entityForm}">
    <div th:if="${field.name}" 
         th:class="${'field-box' + (field.isDirty ? ' dirty' : '') + (field.disabled ? ' disabled' : '')}" 
         blc_admin:component_id="${field}"
         th:classappend="${!field.isVisible}? 'hidden'">

        <div th:if="${field.readOnly}" th:remove="tag">
            <div th:substituteby="fields/readonly" />
        </div>
        <div th:unless="${field.readOnly}" th:remove="tag">
            <div th:substituteby="${'fields/' + #strings.toLowerCase(field.fieldType)}" />
        </div>

        <span th:if="${field.help}" class="field-help" th:utext="#{${field.help}}" />
    </div>
</form>
